<template>
  <el-pagination
  background
  layout="prev, pager, next"
  :total="allPages*10" @current-change='page'>
</el-pagination>
</template>

<script>
import {createNamespacedHelpers} from "vuex";
const {mapState,mapMutations,mapActions}  = createNamespacedHelpers('adminData');
export default {
    data(){
        return{
        }
    },
    computed:{
        ...mapState(['allPages']),
        
    },
    methods:{
        page(i){//i为页数
            this.changeCurrenPage(i);
            this.getAdminDataAsync();
        },
        ...mapMutations(['changeCurrenPage']),
        ...mapActions(['getAdminDataAsync'])
    },
    mounted(){

    }
}
</script>

<style>

</style>